Supporting of M:N relation (many type of messages in many channels) required#224
Merged
viktorprogger merged 5 commits intoyiisoft:masterfrom Dec 8, 2024
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #224 +/- ##
============================================
- Coverage 84.65% 84.18% -0.47%
+ Complexity 372 365 -7
============================================
Files 47 48 +1
Lines 1088 1075 -13
============================================
- Hits 921 905 -16
- Misses 167 170 +3 ☔ View full report in Codecov by Sentry. |
Contributor
|
Hi @holdmann! Thank you for investigation and your code. |
…ring_of_many_channels_many_type_of_messages
samdark
approved these changes
Dec 8, 2024
Member
samdark
left a comment
There was a problem hiding this comment.
Do we need any changes in docs?
Contributor
|
@samdark no, it's just a bugfix |
Contributor
|
I've found the bug and reproduced it in tests. Thank you for your work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Any queue can has many channels, each of them also can has many types of messages.
Current realization supports only one channel <-> one type of message relation.
Еherefore, when processing a queue messages, they are processed successfully until a message with a different type is received.
Then it throws exception:
The main problem is here:
src/Middleware/Consume/ConsumeMiddlewareDispatcher.php on line 43
As you can see
stackbe onlynull|MiddlewareConsumeStack, instead of it should beMiddlewareConsumeStack[].Additional info